<template>
  <el-table
    :data="sginListData"
    height="250"
    border
    v-loading="loading"
    style="width: 100%">
    <el-table-column
      prop="area"
      label="签到地点"
    >
    </el-table-column>
    <el-table-column
      prop="name"
      label="姓名"
      width="180">
    </el-table-column>
    <el-table-column
      prop="createTime"
      label="签到时间">
    </el-table-column>
  </el-table>
</template>

<script>
  import {getSignList} from "../../api/sign";

  export default {
    name: "signList",
    props:['listSignQuery'],
    data(){
      return{
        sginListData:[],
        loading:false,
        total:0,
        listQuery:{
          page:1,
          size:0,
          classId:'',
          courseCode:''
        }
      }
    },
    methods:{
      getSginListData(param) {
        this.loading = true
        this.listQuery.courseCode=param.courseCode
        this.listQuery.classId=param.classId
        console.log("courseCode:"+param)
        getSignList(this.listQuery).then(res=>{
          console.log(res)
          if (res.code != 20000) {
            this.$message.error(res.msg)
            return
          }
          this.sginListData = res.data.pageList
          this.total = res.data.total
          this.loading = false
        }).catch(err=>{
          this.loading = false
        })
      }
    },
    created() {
    }
  }
</script>

<style scoped>

</style>
